package com.community.itelligentcommunity.community.myCommunity.controller;

import com.community.itelligentcommunity.common.base.controller.GenericController;
import com.community.itelligentcommunity.common.base.service.GenericService;
import com.community.itelligentcommunity.community.myCommunity.entity.DecorationApply;
import com.community.itelligentcommunity.community.myCommunity.entity.QueryDecorationApply;
import com.community.itelligentcommunity.community.myCommunity.service.DecorationApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/decorationApply")
public class DecorationApplyController extends GenericController<DecorationApply, QueryDecorationApply> {


    @Autowired
    private DecorationApplyService decorationApplyService;


    @Override
    protected GenericService<DecorationApply, QueryDecorationApply> getService() {
        return decorationApplyService;
    }

    @Override
    public String addPage() throws Exception {
        return "community/myCommunity/decorationApply/add";
    }
    @Override
    public String updatePage(DecorationApply entity, Model model) throws Exception {
        entity = getService().get(entity);
        model.addAttribute("entity",entity);
        return "community/myCommunity/decorationApply/update";
    }

}
